window.addEventListener("load", function () {
    let nav = document.querySelector("#nav");
    let nav_1 = document.querySelector(".nav-1")
    window.addEventListener("scroll", function () {
        if (document.documentElement.scrollTop >= 46) {
            nav.style.position = "fixed";
            nav.style.backgroundColor = "rgb(77, 128, 255)";
            nav.style.top = "0";
            nav_1.style.marginTop = 90 / 75 + "rem";
        } else {
            nav.style.position = "static";
            nav.style.backgroundColor = "transparent";
            nav_1.style.marginTop = "0rem";
        }



    })

})